The DAWriteItemValueObserver<TValue> is an observer that writes incoming values into an OPC Data Access item.
Each OnNext method call on its IObserver<TValue> interface writes the value in the argument into the OPC item associated with the observer. OnCompleted and OnError methods do nothing.
For OPC Classic, you can create instances of DAWriteItemValueObserver<TValue> either by using its constructor, or with use of a static DAWriteItemValueObserver class with several overloads of the Create method. The static DAWriteItemValueObserver.Create methods use the default underlying EasyDAClient object for OPC reactive extensions. If you need to set some parameters in the client object, you can use the ClientSelector property to specify them.
This approach allows the code be expressed only in terms of pure OPC logic, and be not tied to the actual way it is implemented.
The following code fragment creates the observer using one of the Create methods:
It is recommended that you create the instances using the DAWriteItemValueObserver.Create method unless you have special needs.
The UAWriteValueObserver<TValue> is an observer that writes incoming values into an OPC-UA node (more precisely, into an attribute of a node).
Each OnNext method call on its IObserver<TValue> interface writes the value in the argument into the OPC node attribute associated with the observer. OnCompleted and OnError methods do nothing.
For OPC-UA, you can create instances of UAWriteValueObserver<TValue> either by using its constructor, or with use of a static UAWriteValueObserver class with several overloads of the Create method. The static UAWriteValueObserver.Create methods use the default underlying EasyUAClient object for OPC reactive extensions. If you need to set some parameters in the client object, you can use the ClientSelector property to specify them.
This approach allows the code be expressed only in terms of pure OPC logic, and be not tied to the actual way it is implemented.
It is recommended that you create the instances using the UAWriteValueObserver.Create method unless you have special needs.